
import React, { Component } from 'react';
import TextField from 'material-ui/TextField';
import { Router } from 'react-router';
import { browserHistory  } from 'react-router';
import App from './App';
import Layout from '../Layout/index';
const style = {
  marginLeft: 20,
};

class Login extends Component {
    constructor(props,context) {
        super(props,context);
        this.state = { page: 'index.js', description: 'Main layout' };
    }


    render() {
        return (
            <div className="login">
                <div className="login-user">
                    <h3 className="login-title">账号登录</h3>
                   <p>
                        <input type="" name="" placeholder="登录账户"/>
                    </p>
                    <p>
                        <input type="" name="" placeholder="登录密码"/>
                    </p>
                    <p>
                        <div className="button-succeed" onClick={this.test}>
                            登录
                        </div>
                    </p>
                </div>
            </div>
 
            
        ); 
    }

    test=(props)=>{
        console.log('跳转');
        console.log(this);
        // console.log(this.context.router);
        console.log(this.props.history);
        // this.props.history.pushState(null, '/foo')}
        // this.context.router.push('/home');
        // this.context.router.history.push(Layout);
        // console.log(React);
        // console.log(Router);
        // console.log(Router.props);
        // console.log(this.props); 
        // console.log(Router.context);
         // router.push(App,'/App')
       // browserHistory.push('/App');
    }

}

export default Login;
